package edu.lnu.ums.entities;

import javax.persistence.Column;
import javax.persistence.Entity;
import edu.lnu.ums.entities.core.UMSObject;
import java.util.Date;
import javax.persistence.CascadeType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity
public class Event extends UMSObject {
    private static final long serialVersionUID = 1L;

    @Column
    @Temporal(TemporalType.TIMESTAMP)
    private Date datetime;

    @Column
    private String fullName;

    @Column
    private String place;

    @ManyToOne(cascade=CascadeType.PERSIST)
    @JoinColumn
    private Human manager;

    public Date getDatetime() {
        return datetime;
    }

    public void setDatetime(Date datetime) {
        this.datetime = datetime;
    }

    public Human getManager() {
        return manager;
    }

    public void setManager(Human manager) {
        this.manager = manager;
    }

    public String getPlace() {
        return place;
    }

    public void setPlace(String place) {
        this.place = place;
    }

    public String getFullName() {
        return fullName;
    }

    public void setFullName(String fullName) {
        this.fullName = fullName;
    }
}
